package com.movie.demo.service.impl;

import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import com.movie.demo.mapper.DiscussMapper;
import com.movie.demo.pojo.Discuss;
import com.movie.demo.pojo.vo.DiscussInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class DiscussService extends ServiceImpl<DiscussMapper, Discuss> implements com.movie.demo.service.DiscussService {

    @Autowired
    private DiscussMapper discussMapper;

    @Override
    public List<DiscussInfo> Selectdiscuss(Integer mid) {
        List<DiscussInfo> discussList=discussMapper.Selectdiscuss(mid);
        return discussList;
    }

    @Override
    public List<DiscussInfo> AllSelect() {
        List<DiscussInfo> discussList=discussMapper.AllSelect();
        return discussList;
    }

    @Override
    public boolean addDiscuss(Discuss discuss) {
        boolean flag=this.insert(discuss);
        return flag;
    }

    @Override
    public boolean deleteDiscuss(int did) {
        boolean result =this.deleteById(did);
        return result;
    }
}
